<#import "../space_macro.ftl" as space />
<#include "../header.ftl" />
		<@side.sidenav active="文章管理"/>
	    <div class="g-content">
	        <div class="g-content-container">
	            <div class="g-p">
					<div class="m-crumb">
					    <ul class="f-cb">
					        <li><i>&gt;</i><a href="#">博客管理</a></li>
					        <li><i>&gt;</i><a href="#">文章管理</a></li>
					    </ul>
					</div>
					<div class="m-content">
						<form name="postForm" id="postForm" action="${spaceUrl}/admin/post/list" method="GET">
							<@spring.bind "postPage" />
							<!-- pagination parameter -->
							<@spring.formHiddenInput path="postPage.pageNo" />
							<@spring.formHiddenInput path="postPage.totalPages" />
							<@spring.formHiddenInput path="postPage.totalCount" />
							<!-- sorter parameter -->
							<@spring.formHiddenInput path="postPage.sortEnable" />
							<@spring.formHiddenInput path="postPage.sort.field" />
							<@spring.formHiddenInput path="postPage.sort.order" />
							
						    <table class="m-table">
						        <thead>
						            <tr>
						                <th>标题</th>
						                <th class="colb">分类</th>
						                <th class="colb">创建时间</th>
						                <th class="cola">是否置顶</th>
						                <th class="cola">操作</th>
						            </tr>
						        </thead>
						        <tbody>
						        	<#if (postPage?exists && postPage.result?size > 0)>
							        	<#list postPage.result as post>
								        	<tr <#if post_index % 2 == 0>class="even"</#if>>
								                <td>${post.title}</td>
								                <td><#if (post.catalogs?exists && post.catalogs?size > 0)><#list post.catalogs as catalog>${catalog.name}&nbsp;</#list></#if></td>
								                <td>${post.createTime}</td>
								                <td><#if post.isTop>是<#else>否</#if> </td>
								                <td>修改</td>
								            </tr>
							        	</#list>
						        	</#if>
						        </tbody>
						    </table>
						    <#if (postPage.totalPages > 1)>
		                        <@space.pagenavi pageEntity=postPage baseUrl=spaceUrl + "/admin/post/list?pageNo=$page$" />
		                    </#if>
						</form>
					</div>
	            </div>
	        </div>
	    </div>
<#include "../footer.ftl" />